home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QD3D.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  34.1 KB  |  1,039 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QD3D.p
  3.  
  4.      Contains:    Base types for Quickdraw 3D                            
  5.  
  6.      Version:    Technology:    Quickdraw 3D 1.5.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1995-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT QD3D;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __QD3D__}
  28. {$SETC __QD3D__ := 1}
  29.  
  30. {$I+}
  31. {$SETC QD3DIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37.  
  38. {$IFC TARGET_OS_MAC }
  39. {$IFC UNDEFINED __TYPES__}
  40. {$I Types.p}
  41. {$ENDC}
  42. {$ENDC}  {TARGET_OS_MAC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN POWER}
  47. {$LibExport+}
  48.  
  49. {$IFC TARGET_OS_MAC }
  50. {$SETC OS_MACINTOSH := 1 }
  51. {$SETC OS_WIN32 := 0 }
  52. {$SETC OS_UNIX := 0 }
  53. {$SETC OS_NEXT := 0 }
  54. {$SETC WINDOW_SYSTEM_MACINTOSH := 1 }
  55. {$SETC WINDOW_SYSTEM_WIN32 := 0 }
  56. {$SETC WINDOW_SYSTEM_X11 := 0 }
  57. {$SETC WINDOW_SYSTEM_NEXT := 0 }
  58. {$ENDC}  {TARGET_OS_MAC}
  59.  
  60. {$IFC TARGET_OS_WIN32 }
  61. {$SETC OS_MACINTOSH := 0 }
  62. {$SETC OS_WIN32 := 1 }
  63. {$SETC OS_UNIX := 0 }
  64. {$SETC OS_NEXT := 0 }
  65. {$SETC WINDOW_SYSTEM_MACINTOSH := 0 }
  66. {$SETC WINDOW_SYSTEM_WIN32 := 1 }
  67. {$SETC WINDOW_SYSTEM_X11 := 0 }
  68. {$SETC WINDOW_SYSTEM_NEXT := 0 }
  69. {$ENDC}  {TARGET_OS_WIN32}
  70.  
  71.  
  72. {*****************************************************************************
  73.  **                                                                             **
  74.  **                                NULL definition                                 **
  75.  **                                                                             **
  76.  ****************************************************************************}
  77. {*****************************************************************************
  78.  **                                                                             **
  79.  **                                    Objects                                     **
  80.  **                                                                             **
  81.  ****************************************************************************}
  82. {
  83.  * Everything in QuickDraw 3D is an OBJECT: a bunch of data with a type,
  84.  * deletion, duplication, and i/o methods.
  85.  }
  86. {$IFC TARGET_OS_MAC }
  87.  
  88. TYPE
  89.     TQ3ObjectType                        = FourCharCode;
  90. {$ELSEC}
  91.  
  92. TYPE
  93.     TQ3ObjectType                        = LONGINT;
  94. {$ENDC}  {TARGET_OS_MAC}
  95.  
  96.     TQ3ObjectTypePtr                    = ^TQ3ObjectType;
  97.     TQ3Object = ^LONGINT;
  98. {
  99.  * There are four subclasses of OBJECT:
  100.  *    an ELEMENT, which is data that is placed in a SET
  101.  *    a SHAREDOBJECT, which is reference-counted data that is shared
  102.  *    VIEWs, which maintain state information for an image
  103.  *    a PICK, which used to query a VIEW
  104.  }
  105.     TQ3ElementObject                    = TQ3Object;
  106.     TQ3SharedObject                        = TQ3Object;
  107.     TQ3ViewObject                        = TQ3Object;
  108.     TQ3PickObject                        = TQ3Object;
  109. {
  110.  * There are several types of SharedObjects:
  111.  *    RENDERERs, which paint to a drawContext
  112.  *    DRAWCONTEXTs, which are an interface to a device 
  113.  *    SETs, which maintains "mathematical sets" of ELEMENTs
  114.  *    FILEs, which maintain state information for a metafile
  115.  *    SHAPEs, which affect the state of the View
  116.  *    SHAPEPARTs, which contain geometry-specific data about a picking hit
  117.  *    CONTROLLERSTATEs, which hold state of the output channels for a CONTROLLER
  118.  *    TRACKERs, which represent a position and orientation in the user interface
  119.  *  STRINGs, which are abstractions of text string data.
  120.  *    STORAGE, which is an abstraction for stream-based data storage (files, memory)
  121.  *    TEXTUREs, for sharing bitmap information for TEXTURESHADERS
  122.  *    VIEWHINTs, which specifies viewing preferences in FILEs
  123.  }
  124.     TQ3RendererObject                    = TQ3SharedObject;
  125.     TQ3DrawContextObject                = TQ3SharedObject;
  126.     TQ3SetObject                        = TQ3SharedObject;
  127.     TQ3FileObject                        = TQ3SharedObject;
  128.     TQ3ShapeObject                        = TQ3SharedObject;
  129.     TQ3ShapePartObject                    = TQ3SharedObject;
  130.     TQ3ControllerStateObject            = TQ3SharedObject;
  131.     TQ3TrackerObject                    = TQ3SharedObject;
  132.     TQ3StringObject                        = TQ3SharedObject;
  133.     TQ3StorageObject                    = TQ3SharedObject;
  134.     TQ3TextureObject                    = TQ3SharedObject;
  135.     TQ3ViewHintsObject                    = TQ3SharedObject;
  136. {
  137.  * There is one types of SET:
  138.  *    ATTRIBUTESETs, which contain ATTRIBUTEs which are inherited 
  139.  }
  140.     TQ3AttributeSet                        = TQ3SetObject;
  141.     TQ3AttributeSetPtr                    = ^TQ3AttributeSet;
  142. {
  143.  * There are many types of SHAPEs:
  144.  *    LIGHTs, which affect how the RENDERER draws 3-D cues
  145.  *    CAMERAs, which affects the location and orientation of the RENDERER in space
  146.  *    GROUPs, which may contain any number of SHARED OBJECTS
  147.  *    GEOMETRYs, which are representations of three-dimensional data
  148.  *    SHADERs, which affect how colors are drawn on a geometry
  149.  *    STYLEs, which affect how the RENDERER paints to the DRAWCONTEXT
  150.  *    TRANSFORMs, which affect the coordinate system in the VIEW
  151.  *    REFERENCEs, which are references to objects in FILEs
  152.  *  UNKNOWN, which hold unknown objects read from a metafile.
  153.  }
  154.     TQ3GroupObject                        = TQ3ShapeObject;
  155.     TQ3GeometryObject                    = TQ3ShapeObject;
  156.     TQ3ShaderObject                        = TQ3ShapeObject;
  157.     TQ3StyleObject                        = TQ3ShapeObject;
  158.     TQ3TransformObject                    = TQ3ShapeObject;
  159.     TQ3LightObject                        = TQ3ShapeObject;
  160.     TQ3CameraObject                        = TQ3ShapeObject;
  161.     TQ3UnknownObject                    = TQ3ShapeObject;
  162.     TQ3ReferenceObject                    = TQ3ShapeObject;
  163. {
  164.  * For now, there is only one type of SHAPEPARTs:
  165.  *    MESHPARTs, which describe some part of a mesh
  166.  }
  167.     TQ3MeshPartObject                    = TQ3ShapePartObject;
  168. {
  169.  * There are three types of MESHPARTs:
  170.  *    MESHFACEPARTs, which describe a face of a mesh
  171.  *    MESHEDGEPARTs, which describe a edge of a mesh
  172.  *    MESHVERTEXPARTs, which describe a vertex of a mesh
  173.  }
  174.     TQ3MeshFacePartObject                = TQ3MeshPartObject;
  175.     TQ3MeshEdgePartObject                = TQ3MeshPartObject;
  176.     TQ3MeshVertexPartObject                = TQ3MeshPartObject;
  177. {
  178.  * A DISPLAY Group can be drawn to a view
  179.  }
  180.     TQ3DisplayGroupObject                = TQ3GroupObject;
  181. {
  182.  * There are many types of SHADERs:
  183.  *    SURFACESHADERs, which affect how the surface of a geometry is painted
  184.  *    ILLUMINATIONSHADERs, which affect how lights affect the color of a surface
  185.  }
  186.     TQ3SurfaceShaderObject                = TQ3ShaderObject;
  187.     TQ3IlluminationShaderObject            = TQ3ShaderObject;
  188. {
  189.  * A handle to an object in a group
  190.  }
  191.     TQ3GroupPosition = ^LONGINT;
  192.     TQ3GroupPositionPtr                    = ^TQ3GroupPosition;
  193.  * TQ3ObjectClassNameString is used for the class name of an object
  194.  }
  195.  
  196. CONST
  197.     kQ3StringMaximumLength        = 1024;
  198.  
  199.  
  200. TYPE
  201.     TQ3ObjectClassNameString            = PACKED ARRAY [0..1023] OF CHAR;
  202. {*****************************************************************************
  203.  **                                                                             **
  204.  **                            Client/Server Things                             **
  205.  **                                                                             **
  206.  ****************************************************************************}
  207.     TQ3ControllerRef                    = Ptr;
  208. {*****************************************************************************
  209.  **                                                                             **
  210.  **                            Flags and Switches                                 **
  211.  **                                                                             **
  212.  ****************************************************************************}
  213.     TQ3Boolean                     = LONGINT;
  214. CONST
  215.     kQ3False                    = {TQ3Boolean}0;
  216.     kQ3True                        = {TQ3Boolean}1;
  217.  
  218.  
  219. TYPE
  220.     TQ3Switch                     = LONGINT;
  221. CONST
  222.     kQ3Off                        = {TQ3Switch}0;
  223.     kQ3On                        = {TQ3Switch}1;
  224.  
  225.  
  226. TYPE
  227.     TQ3Status                     = LONGINT;
  228. CONST
  229.     kQ3Failure                    = {TQ3Status}0;
  230.     kQ3Success                    = {TQ3Status}1;
  231.  
  232.  
  233. TYPE
  234.     TQ3Axis                     = LONGINT;
  235. CONST
  236.     kQ3AxisX                    = {TQ3Axis}0;
  237.     kQ3AxisY                    = {TQ3Axis}1;
  238.     kQ3AxisZ                    = {TQ3Axis}2;
  239.  
  240.  
  241. TYPE
  242.     TQ3PixelType                 = LONGINT;
  243. CONST
  244.     kQ3PixelTypeRGB32            = {TQ3PixelType}0;                {  Alpha:8 (ignored), R:8, G:8, B:8     }
  245.     kQ3PixelTypeARGB32            = {TQ3PixelType}1;                {  Alpha:8, R:8, G:8, B:8              }
  246.     kQ3PixelTypeRGB16            = {TQ3PixelType}2;                {  Alpha:1 (ignored), R:5, G:5, B:5     }
  247.     kQ3PixelTypeARGB16            = {TQ3PixelType}3;                {  Alpha:1, R:5, G:5, B:5              }
  248.     kQ3PixelTypeRGB16_565        = {TQ3PixelType}4;                {  Win32 only: 16 bits/pixel, R:5, G:6, B:5         }
  249.     kQ3PixelTypeRGB24            = {TQ3PixelType}5;                {  Win32 only: 24 bits/pixel, R:8, G:8, B:8         }
  250.  
  251.  
  252. TYPE
  253.     TQ3Endian                     = LONGINT;
  254. CONST
  255.     kQ3EndianBig                = {TQ3Endian}0;
  256.     kQ3EndianLittle                = {TQ3Endian}1;
  257.  
  258.  
  259. TYPE
  260.     TQ3EndCapMasks                 = LONGINT;
  261. CONST
  262.     kQ3EndCapNone                = {TQ3EndCapMasks}0;
  263.     kQ3EndCapMaskTop            = {TQ3EndCapMasks}$01;
  264.     kQ3EndCapMaskBottom            = {TQ3EndCapMasks}$02;
  265.     kQ3EndCapMaskInterior        = {TQ3EndCapMasks}$04;
  266.  
  267.  
  268. TYPE
  269.     TQ3EndCap                            = LONGINT;
  270.  
  271. CONST
  272.     kQ3ArrayIndexNULL            = -1;
  273.  
  274. {*****************************************************************************
  275.  **                                                                             **
  276.  **                        Point and Vector Definitions                         **
  277.  **                                                                             **
  278.  ****************************************************************************}
  279.  
  280. TYPE
  281.     TQ3Vector2DPtr = ^TQ3Vector2D;
  282.     TQ3Vector2D = RECORD
  283.         x:                        Single;
  284.         y:                        Single;
  285.     END;
  286.  
  287.     TQ3Vector3DPtr = ^TQ3Vector3D;
  288.     TQ3Vector3D = RECORD
  289.         x:                        Single;
  290.         y:                        Single;
  291.         z:                        Single;
  292.     END;
  293.  
  294.     TQ3Point2DPtr = ^TQ3Point2D;
  295.     TQ3Point2D = RECORD
  296.         x:                        Single;
  297.         y:                        Single;
  298.     END;
  299.  
  300.     TQ3Point3DPtr = ^TQ3Point3D;
  301.     TQ3Point3D = RECORD
  302.         x:                        Single;
  303.         y:                        Single;
  304.         z:                        Single;
  305.     END;
  306.  
  307.     TQ3RationalPoint4DPtr = ^TQ3RationalPoint4D;
  308.     TQ3RationalPoint4D = RECORD
  309.         x:                        Single;
  310.         y:                        Single;
  311.         z:                        Single;
  312.         w:                        Single;
  313.     END;
  314.  
  315.     TQ3RationalPoint3DPtr = ^TQ3RationalPoint3D;
  316.     TQ3RationalPoint3D = RECORD
  317.         x:                        Single;
  318.         y:                        Single;
  319.         w:                        Single;
  320.     END;
  321.  
  322. {*****************************************************************************
  323.  **                                                                             **
  324.  **                                Quaternion                                     **
  325.  **                                                                             **
  326.  ****************************************************************************}
  327.     TQ3QuaternionPtr = ^TQ3Quaternion;
  328.     TQ3Quaternion = RECORD
  329.         w:                        Single;
  330.         x:                        Single;
  331.         y:                        Single;
  332.         z:                        Single;
  333.     END;
  334.  
  335. {*****************************************************************************
  336.  **                                                                             **
  337.  **                                Ray Definition                                 **
  338.  **                                                                             **
  339.  ****************************************************************************}
  340.     TQ3Ray3DPtr = ^TQ3Ray3D;
  341.     TQ3Ray3D = RECORD
  342.         origin:                    TQ3Point3D;
  343.         direction:                TQ3Vector3D;
  344.     END;
  345.  
  346. {*****************************************************************************
  347.  **                                                                             **
  348.  **                        Parameterization Data Structures                     **
  349.  **                                                                             **
  350.  ****************************************************************************}
  351.     TQ3Param2DPtr = ^TQ3Param2D;
  352.     TQ3Param2D = RECORD
  353.         u:                        Single;
  354.         v:                        Single;
  355.     END;
  356.  
  357.     TQ3Param3DPtr = ^TQ3Param3D;
  358.     TQ3Param3D = RECORD
  359.         u:                        Single;
  360.         v:                        Single;
  361.         w:                        Single;
  362.     END;
  363.  
  364.     TQ3Tangent2DPtr = ^TQ3Tangent2D;
  365.     TQ3Tangent2D = RECORD
  366.         uTangent:                TQ3Vector3D;
  367.         vTangent:                TQ3Vector3D;
  368.     END;
  369.  
  370.     TQ3Tangent3DPtr = ^TQ3Tangent3D;
  371.     TQ3Tangent3D = RECORD
  372.         uTangent:                TQ3Vector3D;
  373.         vTangent:                TQ3Vector3D;
  374.         wTangent:                TQ3Vector3D;
  375.     END;
  376.  
  377. {*****************************************************************************
  378.  **                                                                             **
  379.  **                        Polar and Spherical Coordinates                         **
  380.  **                                                                             **
  381.  ****************************************************************************}
  382.     TQ3PolarPointPtr = ^TQ3PolarPoint;
  383.     TQ3PolarPoint = RECORD
  384.         r:                        Single;
  385.         theta:                    Single;
  386.     END;
  387.  
  388.     TQ3SphericalPointPtr = ^TQ3SphericalPoint;
  389.     TQ3SphericalPoint = RECORD
  390.         rho:                    Single;
  391.         theta:                    Single;
  392.         phi:                    Single;
  393.     END;
  394.  
  395. {*****************************************************************************
  396.  **                                                                             **
  397.  **                            Color Definition                                 **
  398.  **                                                                             **
  399.  ****************************************************************************}
  400.     TQ3ColorRGBPtr = ^TQ3ColorRGB;
  401.     TQ3ColorRGB = RECORD
  402.         r:                        Single;
  403.         g:                        Single;
  404.         b:                        Single;
  405.     END;
  406.  
  407.     TQ3ColorARGBPtr = ^TQ3ColorARGB;
  408.     TQ3ColorARGB = RECORD
  409.         a:                        Single;
  410.         r:                        Single;
  411.         g:                        Single;
  412.         b:                        Single;
  413.     END;
  414.  
  415. {*****************************************************************************
  416.  **                                                                             **
  417.  **                                    Vertices                                 **
  418.  **                                                                             **
  419.  ****************************************************************************}
  420.     TQ3Vertex3DPtr = ^TQ3Vertex3D;
  421.     TQ3Vertex3D = RECORD
  422.         point:                    TQ3Point3D;
  423.         attributeSet:            TQ3AttributeSet;
  424.     END;
  425.  
  426. {*****************************************************************************
  427.  **                                                                             **
  428.  **                                    Matrices                                 **
  429.  **                                                                             **
  430.  ****************************************************************************}
  431.     TQ3Matrix3x3Ptr = ^TQ3Matrix3x3;
  432.     TQ3Matrix3x3 = RECORD
  433.         value:                    ARRAY [0..2,0..2] OF Single;
  434.     END;
  435.  
  436.     TQ3Matrix4x4Ptr = ^TQ3Matrix4x4;
  437.     TQ3Matrix4x4 = RECORD
  438.         value:                    ARRAY [0..3,0..3] OF Single;
  439.     END;
  440.  
  441. {*****************************************************************************
  442.  **                                                                             **
  443.  **                                Bitmap/Pixmap                                 **
  444.  **                                                                             **
  445.  ****************************************************************************}
  446.     TQ3PixmapPtr = ^TQ3Pixmap;
  447.     TQ3Pixmap = RECORD
  448.         image:                    Ptr;
  449.         width:                    LONGINT;
  450.         height:                    LONGINT;
  451.         rowBytes:                LONGINT;
  452.         pixelSize:                LONGINT;                                {  MUST be 16 or 32 to use with the    Interactive Renderer on Mac OS }
  453.         pixelType:                TQ3PixelType;
  454.         bitOrder:                TQ3Endian;
  455.         byteOrder:                TQ3Endian;
  456.     END;
  457.  
  458.     TQ3StoragePixmapPtr = ^TQ3StoragePixmap;
  459.     TQ3StoragePixmap = RECORD
  460.         image:                    TQ3StorageObject;
  461.         width:                    LONGINT;
  462.         height:                    LONGINT;
  463.         rowBytes:                LONGINT;
  464.         pixelSize:                LONGINT;                                {  MUST be 16 or 32 to use with the    Interactive Renderer on Mac OS }
  465.         pixelType:                TQ3PixelType;
  466.         bitOrder:                TQ3Endian;
  467.         byteOrder:                TQ3Endian;
  468.     END;
  469.  
  470.     TQ3BitmapPtr = ^TQ3Bitmap;
  471.     TQ3Bitmap = RECORD
  472.         image:                    Ptr;
  473.         width:                    LONGINT;
  474.         height:                    LONGINT;
  475.         rowBytes:                LONGINT;
  476.         bitOrder:                TQ3Endian;
  477.     END;
  478.  
  479.     TQ3MipmapImagePtr = ^TQ3MipmapImage;
  480.     TQ3MipmapImage = RECORD
  481.                                                                         {  An image for use as a texture mipmap   }
  482.         width:                    LONGINT;                                {  Width of mipmap, must be power of 2    }
  483.         height:                    LONGINT;                                {  Height of mipmap, must be power of 2   }
  484.         rowBytes:                LONGINT;                                {  Rowbytes of mipmap                     }
  485.         offset:                    LONGINT;                                {  Offset from image base to this mipmap  }
  486.     END;
  487.  
  488.     TQ3MipmapPtr = ^TQ3Mipmap;
  489.     TQ3Mipmap = RECORD
  490.         image:                    TQ3StorageObject;                        {  Data containing the texture map and      }
  491.                                                                         {  if (useMipmapping==kQ3True) the          }
  492.                                                                         {  mipmap data                              }
  493.         useMipmapping:            TQ3Boolean;                                {  True if mipmapping should be used      }
  494.                                                                         {  and all mipmaps have been provided    }
  495.         pixelType:                TQ3PixelType;
  496.         bitOrder:                TQ3Endian;
  497.         byteOrder:                TQ3Endian;
  498.         reserved:                LONGINT;                                {  leave NULL for next version  }
  499.         mipmaps:                ARRAY [0..31] OF TQ3MipmapImage;        {  The actual number of mipmaps is          }
  500.                                                                         {  determined from the size of the          }
  501.                                                                         {  first mipmap                             }
  502.     END;
  503.  
  504. FUNCTION Q3Bitmap_Empty(VAR bitmap: TQ3Bitmap): TQ3Status; C;
  505. FUNCTION Q3Bitmap_GetImageSize(width: LONGINT; height: LONGINT): LONGINT; C;
  506.  
  507. {*****************************************************************************
  508.  **                                                                             **
  509.  **                        Higher dimension quantities                             **
  510.  **                                                                             **
  511.  ****************************************************************************}
  512.  
  513. TYPE
  514.     TQ3AreaPtr = ^TQ3Area;
  515.     TQ3Area = RECORD
  516.         min:                    TQ3Point2D;
  517.         max:                    TQ3Point2D;
  518.     END;
  519.  
  520.     TQ3PlaneEquationPtr = ^TQ3PlaneEquation;
  521.     TQ3PlaneEquation = RECORD
  522.         normal:                    TQ3Vector3D;
  523.         constant:                Single;
  524.     END;
  525.  
  526.     TQ3BoundingBoxPtr = ^TQ3BoundingBox;
  527.     TQ3BoundingBox = RECORD
  528.         min:                    TQ3Point3D;
  529.         max:                    TQ3Point3D;
  530.         isEmpty:                TQ3Boolean;
  531.     END;
  532.  
  533.     TQ3BoundingSpherePtr = ^TQ3BoundingSphere;
  534.     TQ3BoundingSphere = RECORD
  535.         origin:                    TQ3Point3D;
  536.         radius:                    Single;
  537.         isEmpty:                TQ3Boolean;
  538.     END;
  539.  
  540. {
  541.  *    The TQ3ComputeBounds flag passed to StartBoundingBox or StartBoundingSphere
  542.  *    calls in the View. It's a hint to the system as to how it should 
  543.  *    compute the bbox of a shape:
  544.  *
  545.  *    kQ3ComputeBoundsExact:    
  546.  *        Vertices of shapes are transformed into world space and
  547.  *        the world space bounding box is computed from them.  Slow!
  548.  *    
  549.  *    kQ3ComputeBoundsApproximate: 
  550.  *        A local space bounding box is computed from a shape's
  551.  *        vertices.  This bbox is then transformed into world space,
  552.  *        and its bounding box is taken as the shape's approximate
  553.  *        bbox.  Fast but the bbox is larger than optimal.
  554.  }
  555.     TQ3ComputeBounds             = LONGINT;
  556. CONST
  557.     kQ3ComputeBoundsExact        = {TQ3ComputeBounds}0;
  558.     kQ3ComputeBoundsApproximate    = {TQ3ComputeBounds}1;
  559.  
  560.  
  561. {*****************************************************************************
  562.  **                                                                             **
  563.  **                            Object System Types                                 **
  564.  **                                                                             **
  565.  ****************************************************************************}
  566.  
  567. TYPE
  568.     TQ3ObjectClass = ^LONGINT;
  569.     TQ3MethodType                        = LONGINT;
  570. {
  571.  * Object methods
  572.  }
  573. {
  574.  * IO Methods
  575.  }
  576.     TQ3FunctionPointer = ProcPtr;  { PROCEDURE TQ3FunctionPointer; C; }
  577.  
  578.     TQ3MetaHandler = ProcPtr;  { FUNCTION TQ3MetaHandler(methodType: TQ3MethodType): TQ3FunctionPointer; C; }
  579.  
  580. {
  581.  * MetaHandler:
  582.  *        When you give a metahandler to QuickDraw 3D, it is called multiple times to
  583.  *        build method tables, and then is thrown away. You are guaranteed that
  584.  *        your metahandler will never be called again after a call that was passed
  585.  *        a metahandler returns.
  586.  *
  587.  *        Your metahandler should contain a switch on the methodType passed to it
  588.  *        and should return the corresponding method as an TQ3FunctionPointer.
  589.  *
  590.  *        IMPORTANT: A metaHandler MUST always "return" a value. If you are
  591.  *        passed a methodType that you do not understand, ALWAYS return NULL.
  592.  *
  593.  *        These types here are prototypes of how your functions should look.
  594.  }
  595.     TQ3ObjectUnregisterMethod = ProcPtr;  { FUNCTION TQ3ObjectUnregisterMethod(objectClass: TQ3ObjectClass): TQ3Status; C; }
  596.  
  597.     TQ3XObjectClass = ^LONGINT;
  598.     TQ3XMethodType                        = LONGINT;
  599. {
  600.  * Object methods
  601.  }
  602.     TQ3XFunctionPointer = ProcPtr;  { PROCEDURE TQ3XFunctionPointer; C; }
  603.  
  604.     TQ3XMetaHandler = ProcPtr;  { FUNCTION TQ3XMetaHandler(methodType: TQ3XMethodType): TQ3XFunctionPointer; C; }
  605.  
  606. {
  607.  * MetaHandler:
  608.  *        When you give a metahandler to QuickDraw 3D, it is called multiple 
  609.  *        times to build method tables, and then is thrown away. You are 
  610.  *        guaranteed that your metahandler will never be called again after a 
  611.  *        call that was passed a metahandler returns.
  612.  *
  613.  *        Your metahandler should contain a switch on the methodType passed to it
  614.  *        and should return the corresponding method as an TQ3XFunctionPointer.
  615.  *
  616.  *        IMPORTANT: A metaHandler MUST always "return" a value. If you are
  617.  *        passed a methodType that you do not understand, ALWAYS return NULL.
  618.  *
  619.  *        These types here are prototypes of how your functions should look.
  620.  }
  621.     TQ3XObjectUnregisterMethod = ProcPtr;  { FUNCTION TQ3XObjectUnregisterMethod(objectClass: TQ3XObjectClass): TQ3Status; C; }
  622.  
  623. {
  624.  * See QD3DIO.h for the IO method types: 
  625.  *        ObjectReadData, ObjectTraverse, ObjectWrite
  626.  }
  627.  
  628. {*****************************************************************************
  629.  **                                                                             **
  630.  **                                Set Types                                     **
  631.  **                                                                             **
  632.  ****************************************************************************}
  633.     TQ3ElementType                        = LONGINT;
  634.  
  635. CONST
  636.     kQ3ElementTypeNone            = 0;
  637.     kQ3ElementTypeUnknown        = 32;
  638.     kQ3ElementTypeSet            = 33;
  639.  
  640.  *    kQ3ElementTypeUnknown is a TQ3Object. 
  641.  *    
  642.  *        Do Q3Set_Add(s, ..., &obj) or Q3Set_Get(s, ..., &obj);
  643.  *        
  644.  *        Note that the object is always referenced when copying around. 
  645.  *        
  646.  *        Generally, it is an Unknown object, a Group of Unknown objects, or a 
  647.  *        group of other "objects" which have been found in the metafile and
  648.  *        have no attachment method to their parent. Be prepared to handle
  649.  *        any or all of these cases if you actually access the set on a shape.
  650.  *
  651.  *    kQ3ElementTypeSet is a TQ3SetObject. 
  652.  *    
  653.  *        Q3Shape_GetSet(s,&o) is eqivalent to 
  654.  *            Q3Shape_GetElement(s, kQ3ElementTypeSet, &o)
  655.  *            
  656.  *        Q3Shape_SetSet(s,o)  is eqivalent to 
  657.  *            Q3Shape_SetElement(s, kQ3ElementTypeSet, &o)
  658.  *    
  659.  *        Note that the object is always referenced when copying around. 
  660.  *        
  661.  *    See the note below about the Set and Shape changes.
  662.  }
  663.  
  664. {*****************************************************************************
  665.  **                                                                             **
  666.  **                            Object System Macros                             **
  667.  **                                                                             **
  668.  ****************************************************************************}
  669. {*****************************************************************************
  670.  **                                                                             **
  671.  **                                Object Types                                 **
  672.  **                                                                             **
  673.  ****************************************************************************}
  674. {
  675.  * Note:    a call to Q3Foo_GetType will return a value kQ3FooTypeBar
  676.  *            e.g. Q3Shared_GetType(object) returns kQ3SharedTypeShape, etc.
  677.  }
  678.     kQ3ObjectTypeInvalid        = 0;
  679.     kQ3ObjectTypeView            = 'view';
  680.     kQ3ObjectTypeElement        = 'elmn';
  681.     kQ3ElementTypeAttribute        = 'eatt';
  682.     kQ3ObjectTypePick            = 'pick';
  683.     kQ3PickTypeWindowPoint        = 'pkwp';
  684.     kQ3PickTypeWindowRect        = 'pkwr';
  685.     kQ3ObjectTypeShared            = 'shrd';
  686.     kQ3SharedTypeRenderer        = 'rddr';
  687.     kQ3RendererTypeWireFrame    = 'wrfr';
  688.     kQ3RendererTypeGeneric        = 'gnrr';
  689.     kQ3RendererTypeInteractive    = 'ctwn';
  690.     kQ3SharedTypeShape            = 'shap';
  691.     kQ3ShapeTypeGeometry        = 'gmtr';
  692.     kQ3GeometryTypeBox            = 'box ';
  693.     kQ3GeometryTypeGeneralPolygon = 'gpgn';
  694.     kQ3GeometryTypeLine            = 'line';
  695.     kQ3GeometryTypeMarker        = 'mrkr';
  696.     kQ3GeometryTypePixmapMarker    = 'mrkp';
  697.     kQ3GeometryTypeMesh            = 'mesh';
  698.     kQ3GeometryTypeNURBCurve    = 'nrbc';
  699.     kQ3GeometryTypeNURBPatch    = 'nrbp';
  700.     kQ3GeometryTypePoint        = 'pnt ';
  701.     kQ3GeometryTypePolygon        = 'plyg';
  702.     kQ3GeometryTypePolyLine        = 'plyl';
  703.     kQ3GeometryTypeTriangle        = 'trng';
  704.     kQ3GeometryTypeTriGrid        = 'trig';
  705.     kQ3GeometryTypeCone            = 'cone';
  706.     kQ3GeometryTypeCylinder        = 'cyln';
  707.     kQ3GeometryTypeDisk            = 'disk';
  708.     kQ3GeometryTypeEllipse        = 'elps';
  709.     kQ3GeometryTypeEllipsoid    = 'elpd';
  710.     kQ3GeometryTypePolyhedron    = 'plhd';
  711.     kQ3GeometryTypeTorus        = 'tors';
  712.     kQ3GeometryTypeTriMesh        = 'tmsh';
  713.     kQ3ShapeTypeShader            = 'shdr';
  714.     kQ3ShaderTypeSurface        = 'sush';
  715.     kQ3SurfaceShaderTypeTexture    = 'txsu';
  716.     kQ3ShaderTypeIllumination    = 'ilsh';
  717.     kQ3IlluminationTypePhong    = 'phil';
  718.     kQ3IlluminationTypeLambert    = 'lmil';
  719.     kQ3IlluminationTypeNULL        = 'nuil';
  720.     kQ3ShapeTypeStyle            = 'styl';
  721.     kQ3StyleTypeBackfacing        = 'bckf';
  722.     kQ3StyleTypeInterpolation    = 'intp';
  723.     kQ3StyleTypeFill            = 'fist';
  724.     kQ3StyleTypePickID            = 'pkid';
  725.     kQ3StyleTypeReceiveShadows    = 'rcsh';
  726.     kQ3StyleTypeHighlight        = 'high';
  727.     kQ3StyleTypeSubdivision        = 'sbdv';
  728.     kQ3StyleTypeOrientation        = 'ofdr';
  729.     kQ3StyleTypePickParts        = 'pkpt';
  730.     kQ3StyleTypeAntiAlias        = 'anti';
  731.     kQ3ShapeTypeTransform        = 'xfrm';
  732.     kQ3TransformTypeMatrix        = 'mtrx';
  733.     kQ3TransformTypeScale        = 'scal';
  734.     kQ3TransformTypeTranslate    = 'trns';
  735.     kQ3TransformTypeRotate        = 'rott';
  736.     kQ3TransformTypeRotateAboutPoint = 'rtap';
  737.     kQ3TransformTypeRotateAboutAxis = 'rtaa';
  738.     kQ3TransformTypeQuaternion    = 'qtrn';
  739.     kQ3TransformTypeReset        = 'rset';
  740.     kQ3ShapeTypeLight            = 'lght';
  741.     kQ3LightTypeAmbient            = 'ambn';
  742.     kQ3LightTypeDirectional        = 'drct';
  743.     kQ3LightTypePoint            = 'pntl';
  744.     kQ3LightTypeSpot            = 'spot';
  745.     kQ3ShapeTypeCamera            = 'cmra';
  746.     kQ3CameraTypeOrthographic    = 'orth';
  747.     kQ3CameraTypeViewPlane        = 'vwpl';
  748.     kQ3CameraTypeViewAngleAspect = 'vana';
  749.     kQ3ShapeTypeGroup            = 'grup';
  750.     kQ3GroupTypeDisplay            = 'dspg';
  751.     kQ3DisplayGroupTypeOrdered    = 'ordg';
  752.     kQ3DisplayGroupTypeIOProxy    = 'iopx';
  753.     kQ3GroupTypeLight            = 'lghg';
  754.     kQ3GroupTypeInfo            = 'info';
  755.     kQ3ShapeTypeUnknown            = 'unkn';
  756.     kQ3UnknownTypeText            = 'uktx';
  757.     kQ3UnknownTypeBinary        = 'ukbn';
  758.     kQ3ShapeTypeReference        = 'rfrn';
  759.     kQ3ReferenceTypeExternal    = 'rfex';
  760.     kQ3SharedTypeSet            = 'set ';
  761.     kQ3SetTypeAttribute            = 'attr';
  762.     kQ3SharedTypeDrawContext    = 'dctx';
  763.     kQ3DrawContextTypePixmap    = 'dpxp';
  764.     kQ3DrawContextTypeMacintosh    = 'dmac';
  765.     kQ3DrawContextTypeWin32DC    = 'dw32';
  766.     kQ3DrawContextTypeDDSurface    = 'ddds';
  767.     kQ3DrawContextTypeX11        = 'dx11';
  768.     kQ3SharedTypeTexture        = 'txtr';
  769.     kQ3TextureTypePixmap        = 'txpm';
  770.     kQ3SharedTypeFile            = 'file';
  771.     kQ3SharedTypeStorage        = 'strg';
  772.     kQ3StorageTypeMemory        = 'mems';
  773.     kQ3MemoryStorageTypeHandle    = 'hndl';
  774.     kQ3StorageTypeUnix            = 'uxst';
  775.     kQ3UnixStorageTypePath        = 'unix';
  776.     kQ3StorageTypeMacintosh        = 'macn';
  777.     kQ3MacintoshStorageTypeFSSpec = 'macp';
  778.     kQ3StorageTypeWin32            = 'wist';
  779.     kQ3SharedTypeString            = 'strn';
  780.     kQ3StringTypeCString        = 'strc';
  781.     kQ3SharedTypeShapePart        = 'sprt';
  782.     kQ3ShapePartTypeMeshPart    = 'spmh';
  783.     kQ3MeshPartTypeMeshFacePart    = 'mfac';
  784.     kQ3MeshPartTypeMeshEdgePart    = 'medg';
  785.     kQ3MeshPartTypeMeshVertexPart = 'mvtx';
  786.     kQ3SharedTypeControllerState = 'ctst';
  787.     kQ3SharedTypeTracker        = 'trkr';
  788.     kQ3SharedTypeViewHints        = 'vwhn';
  789.     kQ3SharedTypeEndGroup        = 'endg';
  790.     kQ3ObjectTypeEndGroup        = 'endg';
  791.  
  792. {*****************************************************************************
  793.  **                                                                             **
  794.  **                            QuickDraw 3D System Routines                     **
  795.  **                                                                             **
  796.  ****************************************************************************}
  797. FUNCTION Q3Initialize: TQ3Status; C;
  798. FUNCTION Q3Exit: TQ3Status; C;
  799. FUNCTION Q3IsInitialized: TQ3Boolean; C;
  800. FUNCTION Q3GetVersion(VAR majorRevision: LONGINT; VAR minorRevision: LONGINT): TQ3Status; C;
  801. {
  802.  *  Q3GetReleaseVersion returns the release version number,
  803.  *  in the format of the first four bytes of a 'vers' resource
  804.  *  (e.g. 0x01518000 ==> 1.5.1 release).
  805.  }
  806. FUNCTION Q3GetReleaseVersion(VAR releaseRevision: LONGINT): TQ3Status; C;
  807.  
  808. {*****************************************************************************
  809.  **                                                                             **
  810.  **                            ObjectClass Routines                             **
  811.  **                                                                             **
  812.  ****************************************************************************}
  813. {
  814.  *  Q3ObjectClass_Unregister is an obsolete function.  For the new extensions 
  815.  *  model you should now use Q3XObjectHierarchy_UnregisterClass which is 
  816.  *  defined in QD3DExtension.h and takes identical parameters.
  817.  }
  818. FUNCTION Q3ObjectClass_Unregister(objectClass: TQ3ObjectClass): TQ3Status; C;
  819.  
  820.  *  New object system calls to query the object system.
  821.  *
  822.  *  These comments to move to the stubs file before final release, they 
  823.  *  are here for documentation for developers using early seeds.
  824.  }
  825. {
  826.  *  Given a class name as a string return the associated class type for the 
  827.  *  class, may return kQ3Failure if the string representing the class is 
  828.  *  invalid.
  829.  }
  830. FUNCTION Q3ObjectHierarchy_GetTypeFromString(VAR objectClassString: TQ3ObjectClassNameString; VAR objectClassType: TQ3ObjectType): TQ3Status; C;
  831. {
  832.  *  Given a class type as return the associated string for the class name, 
  833.  *  may return kQ3Failure if the type representing the class is invalid.
  834.  }
  835. FUNCTION Q3ObjectHierarchy_GetStringFromType(objectClassType: TQ3ObjectType; VAR objectClassString: TQ3ObjectClassNameString): TQ3Status; C;
  836.  *  Return true if the class with this type is registered, false if not 
  837.  }
  838. FUNCTION Q3ObjectHierarchy_IsTypeRegistered(objectClassType: TQ3ObjectType): TQ3Boolean; C;
  839.  *  Return true if the class with this name is registered, false if not 
  840.  }
  841. FUNCTION Q3ObjectHierarchy_IsNameRegistered(objectClassName: ConstCStringPtr): TQ3Boolean; C;
  842. {
  843.  * TQ3SubClassData is used when querying the object system for
  844.  * the subclasses of a particular parent type:
  845.  }
  846.  
  847. TYPE
  848.     TQ3SubClassDataPtr = ^TQ3SubClassData;
  849.     TQ3SubClassData = RECORD
  850.         numClasses:                LONGINT;                                {  the # of subclass types found for a parent class  }
  851.         classTypes:                TQ3ObjectTypePtr;                        {  an array containing the class types  }
  852.     END;
  853.  
  854. {
  855.  *  Given a parent type and an instance of the TQ3SubClassData struct fill
  856.  *  it in with the number and class types of all of the subclasses immediately
  857.  *  below the parent in the class hierarchy.  Return kQ3Success to indicate no
  858.  *  errors occurred, else kQ3Failure.
  859.  *
  860.  *  NOTE:  This function will allocate memory for the classTypes array.  Be 
  861.  *    sure to call Q3ObjectClass_EmptySubClassData to free this memory up.
  862.  }
  863. FUNCTION Q3ObjectHierarchy_GetSubClassData(objectClassType: TQ3ObjectType; VAR subClassData: TQ3SubClassData): TQ3Status; C;
  864. {
  865.  *  Given an instance of the TQ3SubClassData struct free all memory allocated 
  866.  *    by the Q3ObjectClass_GetSubClassData call.
  867.  *
  868.  *  NOTE: This call MUST be made after a call to Q3ObjectClass_GetSubClassData
  869.  *  to avoid memory leaks.
  870.  }
  871. FUNCTION Q3ObjectHierarchy_EmptySubClassData(VAR subClassData: TQ3SubClassData): TQ3Status; C;
  872.  
  873. {*****************************************************************************
  874.  **                                                                             **
  875.  **                                Object Routines                                 **
  876.  **                                                                             **
  877.  ****************************************************************************}
  878. FUNCTION Q3Object_Dispose(object: TQ3Object): TQ3Status; C;
  879. FUNCTION Q3Object_Duplicate(object: TQ3Object): TQ3Object; C;
  880. FUNCTION Q3Object_Submit(object: TQ3Object; view: TQ3ViewObject): TQ3Status; C;
  881. FUNCTION Q3Object_IsDrawable(object: TQ3Object): TQ3Boolean; C;
  882. FUNCTION Q3Object_IsWritable(object: TQ3Object; theFile: TQ3FileObject): TQ3Boolean; C;
  883.  
  884. {*****************************************************************************
  885.  **                                                                             **
  886.  **                            Object Type Routines                             **
  887.  **                                                                             **
  888.  ****************************************************************************}
  889. FUNCTION Q3Object_GetType(object: TQ3Object): LONGINT; C;
  890. FUNCTION Q3Object_GetLeafType(object: TQ3Object): LONGINT; C;
  891. FUNCTION Q3Object_IsType(object: TQ3Object; theType: TQ3ObjectType): TQ3Boolean; C;
  892.  
  893. {*****************************************************************************
  894.  **                                                                             **
  895.  **                            Shared Object Routines                             **
  896.  **                                                                             **
  897.  ****************************************************************************}
  898. FUNCTION Q3Shared_GetType(sharedObject: TQ3SharedObject): LONGINT; C;
  899. FUNCTION Q3Shared_GetReference(sharedObject: TQ3SharedObject): TQ3SharedObject; C;
  900.  *    Q3Shared_IsReferenced
  901.  *        Returns kQ3True if there is more than one reference to sharedObject.
  902.  *        Returns kQ3False if there is ONE reference to sharedObject.
  903.  *    
  904.  *    This call is intended to allow applications and plug-in objects to delete
  905.  *    objects of which they hold THE ONLY REFERENCE. This is useful when
  906.  *    caching objects, etc.
  907.  *    
  908.  *    Although many may be tempted, DO NOT DO THIS:
  909.  *        while (Q3Shared_IsReferenced(foo)) ( Q3Object_Dispose(foo); )
  910.  *    
  911.  *    Your application will crash and no one will buy it. Chapter 11 is 
  912.  *    never fun (unless you short the stock). Thanks.
  913.  }
  914. FUNCTION Q3Shared_IsReferenced(sharedObject: TQ3SharedObject): TQ3Boolean; C;
  915. {
  916.  *    Q3Shared_GetEditIndex
  917.  *        Returns the "serial number" of sharedObject. Usefuly for caching 
  918.  *        object information. Returns 0 on error.
  919.  *        
  920.  *        Hold onto this number to determine if an object has changed since you
  921.  *        last built your caches... To validate, do:
  922.  *        
  923.  *        if (Q3Shared_GetEditIndex(foo) == oldFooEditIndex) (
  924.  *            // Cache is valid
  925.  *        ) else (
  926.  *            // Cache is invalid
  927.  *            RebuildSomeSortOfCache(foo);
  928.  *            oldFooEditIndex = Q3Shared_GetEditIndex(foo);
  929.  *        )
  930.  }
  931. FUNCTION Q3Shared_GetEditIndex(sharedObject: TQ3SharedObject): LONGINT; C;
  932. {
  933.  *    Q3Shared_Edited
  934.  *        Bumps the "serial number" of sharedObject to a different value. This
  935.  *        call is intended to be used solely from a plug-in object which is 
  936.  *        shared. Call this whenever your private instance data changes.
  937.  *        
  938.  *        Returns kQ3Failure iff sharedObject is not a shared object, OR
  939.  *            QuickDraw 3D isn't initialized.
  940.  }
  941. FUNCTION Q3Shared_Edited(sharedObject: TQ3SharedObject): TQ3Status; C;
  942.  
  943. {*****************************************************************************
  944.  **                                                                             **
  945.  **                                Shape Routines                                 **
  946.  **                                                                             **
  947.  ****************************************************************************}
  948. {
  949.  *    QuickDraw 3D 1.1 Note:
  950.  *
  951.  *    Shapes and Sets are now (sort of) polymorphic.
  952.  *
  953.  *        You may call Q3Shape_Foo or Q3Set_Foo on a shape or a set.
  954.  *        The following calls are identical, in implementation:
  955.  *
  956.  *            Q3Shape_GetElement            =    Q3Set_Get
  957.  *            Q3Shape_AddElement            =    Q3Set_Add
  958.  *            Q3Shape_ContainsElement        =    Q3Set_Contains
  959.  *            Q3Shape_GetNextElementType    =    Q3Set_GetNextElementType
  960.  *            Q3Shape_EmptyElements        =    Q3Set_Empty
  961.  *            Q3Shape_ClearElement        =    Q3Set_Clear
  962.  *
  963.  *    All of these calls accept a shape or a set as their first parameter.
  964.  *
  965.  *    The Q3Shape_GetSet and Q3ShapeSetSet calls are implemented via a new
  966.  *    element type kQ3ElementTypeSet. See the note above about 
  967.  *    kQ3ElementTypeSet;
  968.  *
  969.  *    It is important to note that the new Q3Shape_...Element... calls do not
  970.  *    create a set on a shape and then add the element to it. This data is
  971.  *    attached directly to the shape. Therefore, it is possible for an element
  972.  *    to exist on a shape without a set existing on it as well. 
  973.  *
  974.  *    In your application, if you attach an element to a shape like this:
  975.  *        (this isn't checking for errors for simplicity)
  976.  *
  977.  *        set = Q3Set_New();
  978.  *        Q3Set_AddElement(set, kMyElemType, &data);
  979.  *        Q3Shape_SetSet(shape, set);
  980.  *
  981.  *    You should retrieve it in the same manner:
  982.  *
  983.  *        Q3Shape_GetSet(shape, &set);
  984.  *        if (Q3Set_Contains(set, kMyElemType) == kTrue) (
  985.  *            Q3Set_Get(set, kMyElemType, &data);
  986.  *        )
  987.  *
  988.  *    Similarly, if you attach data to a shape with the new calls:
  989.  *
  990.  *        Q3Shape_AddElement(shape, kMyElemType, &data);
  991.  *
  992.  *    You should retrieve it in the same manner:
  993.  *
  994.  *        if (Q3Shape_ContainsElement(set, kMyElemType) == kTrue) (
  995.  *            Q3Shape_GetElement(set, kMyElemType, &data);
  996.  *        )
  997.  *
  998.  *    This really becomes an issue when dealing with version 1.0 and version 1.1 
  999.  *    metafiles.
  1000.  *
  1001.  *    When attempting to find a particular element on a shape, you should
  1002.  *    first check with Q3Shape_GetNextElementType or Q3Shape_GetElement, then,
  1003.  *    Q3Shape_GetSet(s, &set) (or Q3Shape_GetElement(s, kQ3ElementTypeSet, &set))
  1004.  *    and then Q3Shape_GetElement(set, ...).
  1005.  *
  1006.  *    In terms of implementation, Q3Shape_SetSet and Q3Shape_GetSet should only be
  1007.  *    used for sets of information that are shared among multiple shapes.
  1008.  *    
  1009.  *    Q3Shape_AddElement, Q3Shape_GetElement, etc. calls should only be used
  1010.  *    for elements that are unique for a particular shape.
  1011.  *    
  1012.  }
  1013. FUNCTION Q3Shape_GetType(shape: TQ3ShapeObject): LONGINT; C;
  1014. FUNCTION Q3Shape_GetSet(shape: TQ3ShapeObject; VAR theSet: TQ3SetObject): TQ3Status; C;
  1015. FUNCTION Q3Shape_SetSet(shape: TQ3ShapeObject; theSet: TQ3SetObject): TQ3Status; C;
  1016. FUNCTION Q3Shape_AddElement(shape: TQ3ShapeObject; theType: TQ3ElementType; data: UNIV Ptr): TQ3Status; C;
  1017. FUNCTION Q3Shape_GetElement(shape: TQ3ShapeObject; theType: TQ3ElementType; data: UNIV Ptr): TQ3Status; C;
  1018. FUNCTION Q3Shape_ContainsElement(shape: TQ3ShapeObject; theType: TQ3ElementType): TQ3Boolean; C;
  1019. FUNCTION Q3Shape_GetNextElementType(shape: TQ3ShapeObject; VAR theType: TQ3ElementType): TQ3Status; C;
  1020. FUNCTION Q3Shape_EmptyElements(shape: TQ3ShapeObject): TQ3Status; C;
  1021. FUNCTION Q3Shape_ClearElement(shape: TQ3ShapeObject; theType: TQ3ElementType): TQ3Status; C;
  1022.  
  1023. {$ALIGN RESET}
  1024. {$POP}
  1025.  
  1026. {$SETC UsingIncludes := QD3DIncludes}
  1027.  
  1028. {$ENDC} {__QD3D__}
  1029.  
  1030. {$IFC NOT UsingIncludes}
  1031.  END.
  1032. {$ENDC}
  1033.